#include <QtCore/QCoreApplication>
#include "semanticFuncs.h"

extern "C"
{
    struct ExternalDeclarationList *root;
    int CreateTree(char* filename);
}

int main(int argc, char *argv[])
{
    QCoreApplication app(argc, argv);

    FILE * tree = NULL;

    struct SemanticProgram * program = new SemanticProgram();

    if(CreateTree(".\\examples\\test_8.m") == -1)
        printf("cannot open file!");
    else
    {
        //printf("tree created okay!");
        doSemantic(root, program);
        //tree = freopen("semantic.txt","w",stdout);
        printSemanticProgram(program);
    }

    return app.exec();
}
